FROM openjdk:8u222-jdk
MAINTAINER xiaofeng.yang
ENV RABBITMQ_HOST=localhost \
    RABBITMQ_PORT=5672      \
    USER_NAME=guest         \
    PASSWORD=guest          \
    VIRTUAL_HOST=/          \
    REQUEST_ROUTER=message  \
    JAVA_OPTS="-Xmx1024m -Xms512m"
VOLUME /opt/tmp
ADD target/msg-tcp-origin-jar-with-dependencies.jar /opt/tmp/app.jar
ENTRYPOINT ["sh","-c","java $JAVA_OPTS -Dhost=$RABBITMQ_HOST -Dport=$RABBITMQ_PORT -Duser-name=$USER_NAME -Dpassword=$PASSWORD -Dvirtual-host=$VIRTUAL_HOST -Drequest-router=$REQUEST_ROUTER -jar /opt/tmp/app.jar"]
EXPOSE 8080